package com.bm.api.controller;

import com.bm.api.service.SearchService;
import com.bm.common.dto.SearchDto;
import com.bm.common.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: 赵金帅
 * @Date: 2022/07/19/0:42
 */
@RestController
@RequestMapping("/api/search/")
@Api(tags = "首页接口相关操作-赵金帅")
public class SearchController {
    @Resource
    private SearchService service;
    @ApiOperation(value = "输入房间名，用户名，联盟名字进行搜索")
    @PostMapping("select.do")
    public R serach(@RequestParam String name){
        return service.search(name);
    }
    @ApiOperation(value = "首页左上角头像接口")
    @GetMapping("zuan.do")
    public R zuan(@RequestParam int uid){
        return service.zuan(uid);
    }
    @ApiOperation(value = "热门派对接口")
    @GetMapping("remen.do")
    public R remen(){
        return service.remen();
    }
}
